﻿using System.Collections;
using System.Collections.Generic;
using Pb;
using UnityEngine;

public class EginPDK
{
    private static EginPDK _instance;
    public static EginPDK Instance
    {
        get
        {
            if (_instance == null)
            {
                _instance = new EginPDK();
            }
            return _instance;
        }
    }
    public int createrUid;
    public int roomId;
    public int totalRound;
    public int seatId;
    public int currentRound;
    public int nextSid;

    public ROOM_STATUS roomStatus;
    //底分
    public int baseScore;
    public int bankerSid;
    //是否是房卡模式
    public bool isCardRoom;
    //是否是代开房间
    public bool isAgentRoom;

    public bool isReconnect = false;
    public RunReconnectRoomResponse runReconnectRoomResponse;
    public List<int> SeatList = new List<int>();
    //自己的手牌列表
    public List<int> ownCardList;
    //牌的类型
    public int pokerType;
    public SEX sex;
    public bool CanMoveEnter; //控制cardBtn  里面走Enter 还是Exit;
    //判别初级场 中级场 还是高级场
    public int typeId;

    #region 其他玩家相对自己的seatid
    public void SortSeatId()
    {
        Debug.Log(seatId);
        int DownSeatId = 0;
        int RightSeatId = 0;
        int LeftSeatId = 0;
        if (seatId == 1)
        {
            DownSeatId = 1;
            RightSeatId = 2;                      
            LeftSeatId = 3;
        }
        else if (seatId == 2)
        {
            DownSeatId = 2;
            RightSeatId = 3;           
            LeftSeatId = 1;
        }
        else if (seatId == 3)
        {
            DownSeatId = 3;
            RightSeatId = 1;           
            LeftSeatId = 2;
        }
        
        SeatList.Clear();
        SeatList.Add(DownSeatId);
        SeatList.Add(RightSeatId);      
        SeatList.Add(LeftSeatId);
    }
    public int returnOtherSeatIndex(int seatid)
    {
        int tempReture = 0;
        for (int i = 0; i < SeatList.Count; i++)
        {
            
            if (seatid == SeatList[i])
            {
                tempReture = i;                
                break;
            }
        }
        
        return tempReture;
    }
    #endregion
}


